﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
using AndreySmirnov.BLToolkitUtils.VSPackage.Model.Config;

namespace AndreySmirnov.BLToolkitUtils.VSPackage.Model
{
	[XmlRoot("generationTask", Namespace = BLTConfig.NAMESPACE)]
	[Serializable]
	public class BLTGenerationTask
	{
	    public BLTGenerationTask()
	    {
            GlobalSettings = new BLTCodeGenerationSettings();
            GenerationItems = new List<BLTGenerationItem>();
	    }

	    [XmlAttribute("generateAllTables")]
		public bool GenerateAllTables { get; set; }

		[XmlAttribute("useSingleFile")]
		public bool UseSingleFile { get; set; }

        [XmlElement("globalSettings")]
        public BLTCodeGenerationSettings GlobalSettings { get; set; }

		[XmlArray("items")]
		[XmlArrayItem("item")]
		public List<BLTGenerationItem> GenerationItems { get; set; }
	}
}
